package com.guaika.reggie.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.guaika.reggie.common.ResultMessage;
import com.guaika.reggie.entity.AddressBook;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author GuaiKa
 */
public interface AddressBookService extends IService<AddressBook> {
    /***
     * 保存地址
     * @param addressBook
     * @return
     */
    ResultMessage<AddressBook> addressSave(AddressBook addressBook);

    /***
     * 设置默认地址
     * @param addressBook
     * @return
     */
    ResultMessage<AddressBook> addressSetDefault(AddressBook addressBook);

    /**
     * 根据id获取地址
     * @param id
     * @return
     */
    ResultMessage addressGet(Long id);

    /**
     * 获取默认地址
     * @return
     */
    ResultMessage<AddressBook> addressGetDefault();

    /***
     * 地址数据
     * @param addressBook
     * @return
     */
    ResultMessage<List<AddressBook>> addressList(AddressBook addressBook);
}
